New Approaches for Building RIAs at MAX 2003
At last year's DevCon 2002, developers were just starting to understand Rich Internet Applications (RIAs). They were learning basic coding, understanding the basic architecture; they were just wrapping their heads around this new type of web application, one that behaves like a desktop app for users. Now that some of the smoke has cleared, developers have learned several things:
- RIAs are not just slick Flash apps.
- RIAs can gain business opportunities where HTML-based apps can lose them.
- RIAs are data-enriched apps with back ends based in ColdFusion, .NET, Java, Macromedia Flex, Flash Remoting, and more.
At this year's MAX conference, session presenters showed the evolution of developing RIAs. Developers have deepened their understanding of RIAs and are ready to use them in a wholly different way than the traditional HTML-based web apps. They're asking questions, evaluating how users can best benefit from them, creating them with easier, more efficient methodologies and coding strategies, and basing them on standards. Code-based RIAs was a big theme, more on that in the following coverage. But first, some background in case you're just getting started with RIAs.
Some of you may be asking, what are RIAs? If you'd like to familiarize yourself with RIAs, check out the articles in the RIA Topic Center in the Developer Center, click through a sample RIA, check out the Blueprint PetMarket RIA, and read about the ROI you can reap through using RIAs.

Figure 1. Google hits on Rich Internet Applications more than doubled since last year, from 4,130 to 8,730 hits.
The number of pages on the web that reference Rich Internet Applications increased between May 27 and May 29, 2002, the day Macromedia announced the Macromedia MX product family. The numbers have more than doubled since last year. The statistics show that more people are talking about RIAs. I used Google's popular search API web service and George Fox's article, Creating a Web Service Application Using ColdFusion MX and Dreamweaver MX to create this chart.
Exploring Approaches for Building RIAs
There are several ways to build an RIA, and the right choice isn't always obvious. Starting off with the session, "Creating Data Driven Macromedia Flash Applications," developers learned about all of the main approaches for creating RIAs and gained insight into choosing an approach—loadVars, Flash Remoting, Flash Data Access components, XML, and web services.
The presenter, Paul Gubbay, Macromedia Director of Engineering, examined his demo, the Time Trax application, with the audience, noting that the app has multiple data sources, robust data management, full round-tripping data, and offline data processing. You can get a closer look at his demo app in his article, the Sample Time Entry Application.
Paul gave the audience a sneak peak of a new addition to Flash MX 2004, the Data Connection Wizard. The Flash team created the wizard based on customer feedback that they wanted easier ways to connect to data sources. He showed how the wizard leads a user through connecting to a data source, defining your data source (XML, web services, etc.), and specifying the URL for the data source (an XML file in Gubbay's session example). The wizard downloads the data source structure and introspects the field types. Then, you can format field types (such as date field masks) so you can use them directly in ActionScript in Flash.

Figure 2. Paul Gubbay fields questions from developers on building RIAs with Flash.
In Wednesday night's birds-of-a feather session, Flash Product Manager Lucian Beebe said that the Flash team recognizes that the new version of Flash needs more documentation for developers to understand how to use the new data connectivity components in Flash. Notably, the team just released an updater for Flash to help developers with data connectivity and created an entirely new Flash Developer Center with articles to help Flash developers understand the fundamentals in the new version.
After learning all about which approaches were possible for RIAs, it was time to take a deeper look at the code underlying each approach. Appealing to the code-entrenched (and loving it) developer audience, the session, "Code-Based RIAs," not for the ASCII-faint-of-heart, dug deeply into using components, layouts, and managers to build UIs, helping any design-phobic developer do what they do best—code a user interface. The session highlighted Macromedia Flex, one of the newest Macromedia products.
Macromedia Flex is a presentation server and a way to build RIAs through code, or MXML. MXML, the Flex markup language, is an XML-based language that runs on top of the Flex presentation server, which runs on a J2EE server. The presenter, David George, Senior Principal Engineer for Flex, talked about the Flex architecture and some simple MXML tags and components. In his opinion, the "coolest" feature in Flex is being able to put any ActionScript coding you like within curly braces within MXML; in doing so, Flex introspects all the variables, sets up watchers for those vars, and updates them when content changes.
In general, this code-based approach to building RIAs appeals strongly to those already using Java and C, but also helps code-based developers with designing RIA elements. Says George, "I'm an engineer and there is not one ounce of artist in me, but you'll see that the features in Flex help someone like me." Senior Flex Evangelist Christophe Coenraets also showed the simplicity of MXML in Wednesday's general session. For more on MXML, check out MXML, The Macromedia Flex Markup Language, by Christophe, and for more Flex developer information, check out the Flex Developer Center.
Note that Flex doesn't negate the need for a designer, but makes it easier for designers and developers to work together. A designer can take the look of the RIA further, of course. For instance, in Wednesday morning's general session, the audience reaction audibly "ooohed" when Brady Engineering Manager, Heidi Williams, set a design Christophe's MXML code without corrupting it. Brady is codename for the WYSIWYG editor for Flex. It's based on Dreamweaver.
Again, the audience cheered when she modified an accordion panel by browsing it in Design view, moving to the bottom accordion panel, and then going into Code view to insert a datagrid. Now that's WYSIWYG integration that developers and designers want to use. In fact, in Thursday's "Flex and RIAs" birds-of-a feather session, Rod Hodgman, VP of Macromedia Product Marketing said, "Flex is not about eliminating design or designers...it arose out of the need we heard from developers; they wanted a code-based model for RIAs."
After evaluating approaches and code-based options, it was time for developers to consider a bigger issue in building their RIAs: architecture. RIAs, like any application, can remain loosely structured. But as Gubbay pointed out, even though a managed solution will take longer to plan, in the end, it will ultimately be a more scalable app that you can add functionality to and perform well. Building an RIA with a solid and scalable architecture ensures your customers experience your app with stability and fast performance.
Kevin Hoyt addressed these concerns in his session, "Enterprise Infrastructure for RIAs." Through a simple 42-line hello world Flex app, Hoyt demonstrated how Flex fits into the current service-oriented architecture (SOA) standard. One example of an SOA is web services, but "that is just the tip of the iceberg in SOA possibilities," says Hoyt.
SOAs are platform independent, dynamic in location and invocation, and are self-contained (including state management). SOAs were previously EDI (very complex to implement) and Corba. SOA examples include desktop apps (such as Microsoft Office 2003, Macromedia Central, product activation), enterprise apps (intranets and extranets), web services (Google web services, stock and weather widgets), web logs (RSS), and code examples (ColdFusion and JRun apps).

Figure 4. Kevin Hoyt shows customers a hello world app built in Flex.
The nice thing with Flex is that developers can build the underlying web service any way they like through .NET, ColdFusion, C, Java, and so forth. One tasty tip Hoyt indulged the audience with is that you can rename any Java source file with a JWS extension to expose it as a web web service. The developer sitting next to me went, "wow...cool!" as she listened to Hoyt explain that you could invoke a WSDL in JRun through a URL, such as http://yourserver.com/greetings.jws?wsdl.
There was so much useful information in Hoyt's session, too much to cover here unfortunately, but he went on to show how you could build the hello world app through an HTTP service call, MXML remote object component, and through web services; securing your Flex RIAs; and lastly design patterns in Flex RIAs (service broker, business delegate, and hierarchical MVCs).
The main theme for Flex was that the language itself promotes these patterns in the overall app structure. For security in Flex, you can define a "white list", defining the only URLs your app will permit and you can also take advantage of security that your J2EE layer makes available to your apps. So, we are not only defining and discerning how to build RIAs faster and easier, we're raising the bar for RIAs to technical standards and architecture paradigms. For more about how the architecture under RIAs, check out the RIA Topic Center, Architecture Topic Center, Flash Developer Center, and the Design Brief: Extending Design Patterns into RIAs.
Building RIAs for Your Customers
There's a lot of creating going on. There's a lot of improving going on. But to get to that point, you have to look at what works and what doesn't work in RIAs. Two sessions focused on case studies, "Developing Better Enterprise Applications with Rich Internet Applications" presented by David Hogue and Nathan Moody of Fluid Inc., who created one of Macromedia's first RIAs, the Mortgage Calculator Application. The other session, "Looking at RIAs Through the Eyes of Your Customer," by Christina Perfetti explored the reasons why some RIAs work and some don't, and surprisingly highlighted some very simple but crucial lessons.
RIAs have an advantage over HTML-based apps in that they can give users context-sensitive functionality and information. The underlying theme in Hogue and Moody's experience with developing better RIAs for their customer was that they thought of their client's budget and the client's business goal. They are agnostic in choosing the technology underlying their clients' projects; what they choose for language and platform all depends on the client.
The linear experience no longer dictates a user's workflow, users can follow their own preferences instead. In creating context-sensitive RIAs, they stressed the fact that interfaces can and should be linear when that is the goal, but that some clients need a non-linear user workflow. They key, said Hogue, is to keep in mind that, "we're all in the business of solving our customer's problems." And if something in an RIA interface is not solving the current problem for the end user, it shouldn't be there!
They showed two RIAs. One a linear workflow, badge creator for Avery Photo ID Systems for visitors to a company, and the other called, BrainGlow, a non-linear story creator for creating multimedia children's stories. In the badge creator, they used a linear workflow because the security requirements for the facility were necessary (note also, that Fluid won a Macromedia MAX award in the Business Experience category for this application); meanwhile, BrainGlow is a more creative endeavor. Users create the story and pull components into timeline that they can play backwards or forwards, and to which they can add audio files.
Check out both apps at Fluid and the Mortgage Calculator on the Macromedia website; all of the apps demo'd were truly impressive, you have to see them and interact with them to believe it.
Remember surfing sites that used such load-intensive movies that you closed the browser and surfed elsewhere? It's possible to misuse any new technology It's possible to drive away customers, even with RIAs, if you don' consider the customer experience.
In "Looking at RIAs through the Eyes of Your Customer," Christine Perfetti, a researcher at User Interface Engineering based in boston, shared some very simple but important lessons they learned in studying RIAs with their clients, Jordan's Furniture, Volkswagon, Broadmoor Hotel, Timbuktu Bags, and more. She started the session by saying that only 42% of web surfers succeed in getting what they want through web applications today. "That's a failing grade, that's an F!" she said.

Figure 5. Christine Perfetti explains simple criteria for designing effective RIAs.
She said in a typical user group study, her company asks users to accomplish a task on a website. With Disney.com, they asked users to find the cheapest hotel at Walt Disney World. Surprisingly, the study revealed that only 15.7% of the users surfing the Flash version of the site succeeded in finding a hotel. Meanwhile, 75% of the users who used the non-Flash version of the site succeeded in finding a hotel!
Moreover, those that succeeded at booking their hotel room through the Flash version of the website booked their hotel at Disney Land (in California) instead of Disney World (in Florida). In the end, all of the customers who used the Flash version said that they would never come back to the website, but more importantly, decided not to come to Disney World at all. The point? Any application, whether it's an RIA or not, must help the customer achieve his goal.
In short, RIAs that satisfy have the following qualities: visual detail, immediate feedback, invisible client/server interaction (RIAs make it transparent), give users control over their workflow, show users all steps in the workflow, and give functionality that is not available through HTML-based applications. "RIAs show huge promise," said Perfetti.
In something called the "7/11 Milk Experiment" method, Perfetti explained, users that are interested in a goal, for instance, buying an MP3 player, are given money to accomplish that task on an MP3 player website, such as Rio (the product and website can vary, of course). In this study, the users loved the Rio RIA because they could interact with the MP3 players, push buttons, play music, and see all views of the player (front and back). RIAs aren't based on static text, and a traditional html-based app couldn't have accomplished this level of interactivity. But, she cautions, RIAs can fail.
For example, on the Volkswagon site, they gave Volkswagon devotees money to purchase t-shirts. The RIA fulfilled the criteria for a useful RIA, but in the end, the shirts were out of stock; without helping the user reach his/her end goal, the site failed. Perfetti said the user was disappointed, "He said, 'I wish they had told me it wasn't available before I went through that entire experience.'"
In a similar case, Jordan's Furniture (also based in Boston), has a great interactive room planner RIA. Users can change the dimensions and shape of the room through drag-drop mouse clicks. Then they can pull different types of furniture into the room. The problem? There were no pictures of what the furniture actually looked like, the furniture images were merely outlines. While customers loved using the application and thought it was fun and professional, "not one actually bought a piece of furniture through the website, not one!" said Perfetti.
In yet another example, she showed a cheesecake RIA that was not really interactive; an application that gave customer a page-based, HTML-based experience, but built in Flash. "Having the Next button in this RIA was unnecessary."
Building on Hogue/Moody's point, RIAs can avoid direct text instructions for the user and instead build them visually into the context of the app; what the customer can and should do next should be obvious as they interact with the app. If it isn't obvious what to do, a problem with a VW app for configuring a car, for instance, customers don't succeed. "Customers looked at this RIA blankly for a few minutes. They just didn't know what to do," said Perfetti.
In the end, Perfetti summarized, "Think about the goals of your RIA. What do you want your customers to be able to do?" Only use an RIA where it will help your customer accomplish what they cannot accomplish an a traditional HTML-based application. She urged all developers to conduct user testing, and said you don't have to hire a company to do it.
Testing with 80-90 testers over the lifetime of the development cycle is not too much, she said. Merely have 1-2 users interact with your app every 1-2 weeks. What about the beginning, when you haven't even created the web design, an audience member asked. "Have them interact with pieces of paper," she said, "they click, and then you give them another piece of paper based on their choice. It sounds strange, but doing that testing at this stage helps you create a better design, workflow, and application," and better RIAs.
RIAs give developers and users a whole new way to use the web. During MAX 2003, developers focused on the code behind RIAs, architecting it based on design patterns and standards; but lest you forget, RIAs must be held to the same basic criteria as any web app: the quality of the user experience. Combining a deeper look at the back end of RIAs along with helping your customers achieve their goals through design and data will ensure your RIAs take the web and users to the next level of experience.
